#version 330

struct Matrices
{
	mat4 proj;
	mat4 view;
	mat4 model;
};

uniform Matrices u_matrices;

layout (location = 0) in vec3 i_vertex;
layout (location = 1) in vec3 i_normal;

smooth out vec4 io_vertColor;

void main()
{
	gl_Position = (
		u_matrices.proj * 
		u_matrices.view * 
		u_matrices.model * 
		vec4(i_vertex, 1.0)
	);
	
	io_vertColor = vec4(vec3(0.5 * i_normal + 0.5), 1.0);
}